package world0;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

import world0.menu.MainMenuState;

public class World0Game extends StateBasedGame
{
	public static final int MAINMENUSTATE = 0;
	public static final int GAMEPLAYSTATE = 1;
	
	public World0Game() {
		super ("World-Zero");
	}
	
	public static void main(String[] args) throws SlickException
	{
		AppGameContainer app = new AppGameContainer (new World0Game());
		
		app.setDisplayMode(1280, 720, false);
		//app.setDisplayMode(800, 600, false);
		//app.setDisplayMode(app.getScreenWidth(), app.getScreenHeight(), true);
		app.setShowFPS(true);
		app.setVSync(true);
		app.setSmoothDeltas(true);
		app.setMaximumLogicUpdateInterval(5);
		app.setMinimumLogicUpdateInterval(5);
		app.setTargetFrameRate(60); 
		app.setIcon("textures/icons/4.png");
		app.setAlwaysRender(true);
		//app.setClearEachFrame(true); 
		app.start();
	}
	
	@Override
	public void initStatesList (GameContainer gameContainer) throws SlickException
	{	
		this.addState (new MainMenuState(MAINMENUSTATE));
		this.addState (new GameplayState(GAMEPLAYSTATE));
	
		//this.enterState (MAINMENUSTATE);
		this.enterState (GAMEPLAYSTATE);		
	}
}
